package cn.ciis.basic.routes;

import cn.ciis.basic.interceptor.AdminAuthInterceptor;
import cn.ciis.basic.interceptor.PjaxInterceptor;
import cn.ciis.ciis.dictionary.DictionaryAdminController;
import cn.ciis.ciis.enterprise.EnterpriseAdminController;
import cn.ciis.ciis.equipment.EquipmentAdminController;
import cn.ciis.ciis.index.IndexAdminController;
import cn.ciis.ciis.region.RegionAdminController;
import cn.ciis.ciis.sensor.SensorDataAdminController;
import cn.ciis.ciis.test.DeviceTestController;
import com.jfinal.config.Routes;

public class CiisRoutes extends Routes {
    @Override
    public void config() {
        addInterceptor(new AdminAuthInterceptor());
        addInterceptor(new PjaxInterceptor());

        setBaseViewPath("/_view/_admin/_ciis");
        //匹配路由信息
		//数据字典
		add("/admin/ciis/dictionary", DictionaryAdminController.class, "/dictionary");
		//企业信息
		add("/admin/ciis/enterprise", EnterpriseAdminController.class, "/enterprise");
		//设备信息
		add("/admin/ciis/equipment", EquipmentAdminController.class, "/equipment");
		//区域信息
		add("/admin/ciis/region", RegionAdminController.class, "/region");
		add("/admin/ciis/devicetest", DeviceTestController.class,"devicetest");

		add("/admin/ciis", IndexAdminController.class,"index");
        //历史数据
		add("/admin/ciis/sensordata", SensorDataAdminController.class,"sensordata");
    }
}
